using System;
using System.IO;

namespace DeclarativeTest.Core
{
	class AssertUtils
	{
		public static void AssertFileExists( string fileName, string paramName )
		{
			if( !File.Exists( fileName ) )
				throw new FileNotFoundException( );
		}

		public static void ArgumentIsNullOrEmpty( string argument, string paramName  )
		{
			if( String.IsNullOrEmpty(argument) )
				throw new ArgumentException( String.Format( "Argument {0} can not be null or empty string", paramName ), paramName );
		}

		public static void ArgumentIsNullOrEmpty( string argument, string paramName, string message  )
		{
			if( String.IsNullOrEmpty( argument ) )
				throw new ArgumentException( message, paramName );
		}


	}

	public static class Assume
	{
		public static void ArgumentIsNotNull( object argument, string paramName )
		{
			if( argument == null )
			{
				string message = String.Format( "Argument {0} can not be null", paramName );
				throw new ArgumentException( message, paramName );
			}
		}		
	}

	
}